import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

/*配置路由信息*/
const routes = [

  {
    path: '/',
    name: 'index',
    redirect:'/login',
    component: () => import(/* webpackChunkName: "about" */ '../views/indexView'),
    children:[
      {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/loginView')
      },
      {
        path: '/main',
        name: 'main',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/main')
      },
      {
        path: '/home',
        name: 'home',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/home')
      },
      {
        path: '/resource',
        name: 'resource',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/resource')
      },
      {
        path: '/environment',
        name: 'environment',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/environment')
      },
      {
        path: '/equipment',
        name: 'equipment',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/equipment')
      },
      {
        path: '/family',
        name: 'family',
        component: () => import(/* webpackChunkName: "about" */ '../views/index/family')
      }
    ]
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
